<?php

namespace app\api\model\user;

use app\common\model\user\PointsLog as PointsLogModel;

/**
 * 积分变动明细模型
 */
class PointsLog extends PointsLogModel
{
    /**
     * 获取日志明细列表
     */
    public function getList($userId, $limit, $map = [])
    {
        $query = $this->where('user_id', '=', $userId);
        if ($map) {
            $query->where($map);
        }
        return $query->order(['create_time' => 'desc'])->paginate($limit);
    }

}